import React from 'react';
import { CloseOutlined } from '@ant-design/icons';
import styles from './index.less';

export default ({ visible, closeDrawer, children }) => {
  return (
    <div className={`${styles.drawerContainer} ${visible ? styles.visible : null}`}>
      <span className={styles.drawerCloseItem} onClick={closeDrawer}>
        <CloseOutlined />
      </span>
      {children}
    </div>
  );
};
